package com.huluobo.appbase.expand

/**
 * Created by lc on 2023/3/7.
 * 给List添加分隔符的扩展方法,用于String的换行
 * ["1","2","3"] ->
 * ["1",
 * "2",
 * "3"]
 */

fun List<String>?.splitData(): String {
    val stringBuffer = StringBuffer()
    if (!isNullOrEmpty()) {
        for (i in this.indices) {
            stringBuffer.append(this[i] + "\n")
        }
    }
    return stringBuffer.toString()
}